package demo15;

import java.util.Arrays;
import java.util.function.IntToDoubleFunction;

public class LambdaTest1 {
    public static void main(String[] args) {
        double[] prices = {99.8, 128, 100};
//        Arrays.setAll(prices, new IntToDoubleFunction() {
//            @Override
//            public double applyAsDouble(int value) {
//                return prices[value] * 0.8;
//            }
//        });
        Arrays.setAll(prices,value -> prices[value] * 0.8);
        for (int i = 0; i < prices.length; i++) {
            System.out.println(prices[i]);
        }
    }
}
